package com.wbs.shop.nuby.bean;

/**
 * Created by zhoucl on 2016/11/11.
 */
public class ResultBean<T> extends BaseBean {

    public static int SUCCESS = 200;

    /**
     * 用户未登录
     */
    public static final int NOT_LOGIN = 401;
    /**
     * 账号已存在
     */
    public static final int ACCOUNT_ = 402;
    //没有补全店铺资料
    public static final int ORGAN_AUDTI_NOT_PASS = 555;
    //店铺审核不通过修改资料返回
    public static final int ORGAN_NOT_INFO = 556;
    /**
     * 服务器错误
     */
    public static final int SERVICE_ERROR = 500;

    private int code;
    private String msg;
    private T data;
    private PageBean page;

    public boolean isOk() {
        return code == SUCCESS;
    }

    public boolean isNotLogin() {
        return code == NOT_LOGIN;
    }

    public boolean isServiceError() {
        return code == SERVICE_ERROR;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public PageBean getPage() {
        return page;
    }

    public void setPage(PageBean page) {
        this.page = page;
    }
}
